//
//  RequestApi+Login.h
//  MexicoLoan
//
//  Created by wxp on 2025/2/26.
//

#import "RequestApi.h"

NS_ASSUME_NONNULL_BEGIN

@interface RequestApi (Login)

#pragma mark - 发送验证码的次数
+ (void)requestSendSmsCountWithPhone:(NSString *)phone
                            delegate:(id <RequestDelegate>)delegate
                             success:(void (^)(NSDictionary * response, id mark))success
                             failure:(void (^)(NSString * errorStr, id mark))failure;

#pragma mark - 发送验证码
+ (void)requestSendSmsWithPhone:(NSString *)phone
                           type:(NSString *)type
                     smsChannel:(NSString *)smsChannel
                           delegate:(id <RequestDelegate> _Nullable)delegate
                            success:(void (^)(NSDictionary * response, id mark))success
                        failure:(void (^)(NSString * errorStr, id mark))failure;

#pragma mark - 是否需要登录活体
+ (void)requestNeedLoginAuthWithPhone:(NSString *)phone
                          vcode:(NSString *)vcode
                           delegate:(id <RequestDelegate> _Nullable)delegate
                            success:(void (^)(NSDictionary * response, id mark))success
                              failure:(void (^)(NSString * errorStr, id mark))failure;

#pragma mark - 登录
+ (void)requestLoginWithPhone:(NSString *)phone
                        vcode:(NSString *)vcode
             livenChannelEnum:(NSString *)livenChannelEnum
                           delegate:(id <RequestDelegate>)delegate
                            success:(void (^)(NSDictionary * response, id mark))success
                      failure:(void (^)(NSString * errorStr, id mark))failure;

// 退出登录
+ (void)requestLogoutWithDelegate:(id <RequestDelegate> _Nullable)delegate
                            success:(void (^)(NSDictionary * response, id mark))success
                          failure:(void (^)(NSString * errorStr, id mark))failure;

#pragma mark - 活体认证之后的登录
+ (void)requestLiveSuccessLoginWithPhone:(NSString *)phone
                        vcode:(NSString *)vcode
                                 liveImg:(NSString *)liveImg
                              livenessId:(NSString *)livenessId
             livenChannelEnum:(NSString *)livenChannelEnum
                           delegate:(id <RequestDelegate>)delegate
                            success:(void (^)(NSDictionary * response, id mark))success
                                 failure:(void (^)(NSString * errorStr, id mark))failure;


@end

NS_ASSUME_NONNULL_END
